package metier;

import java.util.Calendar;
import java.util.GregorianCalendar;

public class EmployesDao {

	static private Employe [] employeDB = {

		new Employe("Papon", "Christophe", new GregorianCalendar(1991, Calendar.JULY, 28), "Masculin", 5007, "azeret", "CPMenterau", EnumCategorieEmploye.BIBLIOTHECAIRE),
		new Employe("YAHIA", "Amine", new GregorianCalendar(1970, Calendar.JULY, 28), "Masculin", 5008, "azqseft", "Yhasqd", EnumCategorieEmploye.GESTIONNAIRE_DE_FONDS),
		new Employe("YAHIA", "Amine", new GregorianCalendar(1970, Calendar.JULY, 28), "Masculin", 5009, "azqseft", "Yhasqd", EnumCategorieEmploye.RESPONSABLE),
		new Employe("YAHIA", "Amine", new GregorianCalendar(1970, Calendar.JULY, 28), "Masculin", 5002, "azqseft", "Yhasqd", EnumCategorieEmploye.BIBLIOTHECAIRE),
		new Employe("YAHIA", "Amine", new GregorianCalendar(1970, Calendar.JULY, 28), "Masculin", 5002, "azqseft", "Yhasqd", EnumCategorieEmploye.GESTIONNAIRE_DE_FONDS),
		new Employe("YAHIA", "Amine", new GregorianCalendar(1970, Calendar.JULY, 28), "Masculin", 5002, "azqseft", "Yhasqd", EnumCategorieEmploye.RESPONSABLE),		
		new Employe("YAHIA", "Amine", new GregorianCalendar(1970, Calendar.JULY, 28), "Masculin", 5002, "azqseft", "Yhasqd",EnumCategorieEmploye.GESTIONNAIRE_DE_FONDS),		};
	
	public static Employe findByKey (int id){
		Employe em = null;
		for (Employe employe : employeDB)
			if((employe.getIdUtilisateur() ==id)) 
				em = new Employe(employe.getNom(), employe.getPrenom(), employe.getDateNaissance(), employe.getSexe(), employe.getIdUtilisateur(), employe.getPwd(), employe.getPseudo(), employe.getCategorieEmploye() );
		return em;
}
}
